<template>
    <div id="editor" contenteditable="true">可编辑饿了</div>
</template>

<script  lang="ts">
import { onMounted } from 'vue'
import Editor from '../editor'
export default {
    setup() {
        onMounted(() => {
            const dom = document.getElementById('editor')
            if (dom) {
                const editor = new Editor(dom)
                editor.init()
            }
        })
    }
}
</script>

<style>
#editor {
    height: 60px;
    width: 200px;
    border: 1px solid #dcdcdc;
}

#editor:focus {
    outline: 0;
}
</style>